<script type="text/javascript" src="/js/cartoon.js"></script>
<style>
div,ul{padding:0;margin:0;}
#header{width:1000px;border:1px #6fc solid;height:40px;text-align:center;}
#header label{width:100px;border:1px  solid;float:left;margin:0 auto;}
#header ul{width:998px;border:1px #6fc solid;height:20px;margin:0 auto;}
#header ul li{float:left;padding:0 5px 0 5px;list-style-type:none;}
#header ul li span{cursor:pointer; font-size:14;float:left;padding:0 5px ;}
</style>
<div id="header">
	<label >显示位置：</label>
	<ul>
		<li><span  onclick="req_link('flag',0)">普通</span></li>
		<li><span  onclick="req_link('flag',<?=CONST_CT::RECOM_HOME ?>)">首页推荐</span></li>
		<li><span  onclick="req_link('flag',<?=CONST_CT::RECOM_NEW  ?>)">最新推荐</span></li>
	</ul>
</div>
<table class="list"  cellpadding="0" width="100%" cellspacing="0" style="float: left">
	<thead align="center">
		<td nowrap></td>
		<td nowrap>id</td>
		<td nowrap>名称</td>
		<td nowrap>作者</td>
		<td nowrap>封面</td>
		<td nowrap>状态</td>
		<td nowrap>推荐状态</td>
		<td nowrap>国家</td>
		<td nowrap>话数</td>
		<td nowrap>浏览数</td>
		<td nowrap>类别</td>
		<td nowrap>系列</td>
		<td nowrap>读者群</td>
		<td nowrap>评分</td>
		<td nowrap>评论数</td>
		<td nowrap>创建时间</td>
		<td nowrap>更新时间</td>
		<td nowrap>操作</td>
	</thead>
	<? foreach ($this->ret['data'] as $row):?>
	<tr align="left">
		<td nowrap><input type="checkbox" value="<?=$row['id']?>" id="ckb_<?=$row['id']?>" /></td>
		<td nowrap><?= $row['id']?></td>
		<td nowrap><a href="<?=$this->_makeURL('cartoon', 'index', 'edit_form', array('id'=>$row['id']))?>"><?= $row['ct_title']?></a></td>
		<td nowrap>
			<?=$row['ct_author']?>
		</td>
		<td nowrap align="left">
		<img src="<?= CT_IMG_DOMAIN.$row['ct_cover'] ?>" width="32" height="32"/></td>
		<td nowrap align="left">
		<?= $row['ct_flag']==1?'<span class="availible">连载中</span>':'<span class="unavailible">已完结</a>'?>
		</td>
		<td nowrap align="left">
		<?= $row['ct_flag']==1?'<span class="availible">连载中</span>':'<span class="unavailible">已完结</a>'?>
		</td>
		<td nowrap>
		<?=$_SERVER['cartoon']['nation'][$row['ct_nation']]?>
		</td>
		<td nowrap>
		<?=$row['ct_sections']?>
		</td>
		<td nowrap>
		<?=$row['ct_viewnum']?>
		</td>
		<td>
		<?=$row['ct_category']?>
		</td>
		<td>
		<?=$row['ct_series']?>
		</td>
		<td>
		<?=$row['ct_reader_group']?>
		</td>
		<td>
		<?=$row['ct_score']?>
		</td>
		<td>
		<?=$row['ct_comments']?>
		</td>
		<td>
		<?=date('Y-m-d H:i',$row['ct_dateline'])?>
		</td>
		<td>
		<?=date('Y-m-d H:i',$row['ct_update'])?>
		</td>
		<td nowrap align="left">
		<a href="<?=$this->_makeURL($this->app, $this->controller, 'chapter_list', array('cartoon_id'=>$row['id']))?>"  >管理章节</a>
		<a href="javascript:void(0);"  onclick="Cartoon.remove_ct(<?= $row['id']?>)">删除</a>
		</td>
	</tr>
	<? endforeach;?>
	<thead>
	<td colspan="18">
	<div style="float:left">
		<input type="checkbox" id="checkall" onclick="Cartoon.chkall('checkall')" /> 全选
		将所选设置为  ：
		<select id="recomment" name="recomment">
			<option value="0">正常</option>
			<option value="<?=CONST_CT::RECOM_HOME ?>">首页推荐</option>
			<option value="<?=CONST_CT::RECOM_HOT ?>">热门推荐</option>
			<option value="<?=CONST_CT::RECOM_NEW ?>">最新推荐</option>
		</select>
		<input type="button" onclick="Cartoon.recom($('recomment').options[$('recomment').selectedIndex].value)" value="确定" />
		
		&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="button" onclick="Cartoon.remove_ct();" value="删除所选" />
	</div>
	<div style="float:right"><?=$this->ret['pages']?></div></td>
	</thead>
</table>